package com.fuyq.demospringbootstarter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties({HelloProperties.class})
public class HelloAutoConfiguration {
    @Autowired
    HelloProperties helloProperties;

    @Bean
    public Hello initHello(){
        return new Hello(helloProperties.getName());
    }
}
